﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Rapid
{
    class Validatetion
    {
        public static bool IsModeValid(string textNumber)
        {
            if (string.IsNullOrEmpty(textNumber))
            {
                MessageBox.Show("The patient ID is required!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }

            int temp;
            if (!int.TryParse(textNumber, out temp))
            {
                MessageBox.Show("The patient ID must be is number", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return false;
            }
            return true;
        }
    }
}
